#!/bin/bash
#
#       This program is free software; you can redistribute it and/or modify
#       it under the terms of the GNU General Public License as published by
#       the Free Software Foundation; either version 2 of the License, or
#       (at your option) any later version.
#       
#       This program is distributed in the hope that it will be useful,
#       but WITHOUT ANY WARRANTY; without even the implied warranty of
#       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#       GNU General Public License for more details.
#       
#       You should have received a copy of the GNU General Public License
#       along with this program; if not, write to the Free Software
#       Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
#       MA 02110-1301, USA.
#
# RuneScape Online
# Date: 03/09/2011
#
SELECT=`zenity --list --window-icon=./usr/local/games/runescape/images/jagexappletviewer.png --width=300 --height=200 --radiolist --column "AT" --column "Select Language" \
       TRUE  "English" \
	   FALSE "Deutsch"\
	   FALSE "Français"\
	   FALSE "Português"`
	   
if echo "$SELECT" | grep $"English"; then
	/usr/bin/java -Djava.class.path="/usr/local/games/runescape/bin/jagexappletviewer.jar" -Dcom.jagex.config=$'\x68\x74\x74\x70://\x77\x77\x77.runescape.\x63\x6f\x6d/k=3/l=en/jav_config\x2e\x77\x73' jagexappletviewer /runescape/images/jagexappletviewer.png
fi
if echo "$SELECT" | grep $"Deutsch"; then
	/usr/bin/java -Djava.class.path="/usr/local/games/runescape/bin/jagexappletviewer.jar" -Dcom.jagex.config=$'\x68\x74\x74\x70://\x77\x77\x77.runescape.\x63\x6f\x6d/l=1/l=en/jav_config\x2e\x77\x73' jagexappletviewer /runescape/images/jagexappletviewer.png
fi
if echo "$SELECT" | grep $"Français"; then
	/usr/bin/java -Djava.class.path="/usr/local/games/runescape/bin/jagexappletviewer.jar" -Dcom.jagex.config=$'\x68\x74\x74\x70://\x77\x77\x77.runescape.\x63\x6f\x6d/l=2/l=en/jav_config\x2e\x77\x73' jagexappletviewer /runescape/images/jagexappletviewer.png
fi
if echo "$SELECT" | grep $"Português"; then
    /usr/bin/java -Djava.class.path="/usr/local/games/runescape/bin/jagexappletviewer.jar" -Dcom.jagex.config=$'\x68\x74\x74\x70://\x77\x77\x77.runescape.\x63\x6f\x6d/l=3/l=en/jav_config\x2e\x77\x73' jagexappletviewer /runescape/images/jagexappletviewer.png
fi
